import request from '@/utils/request'

// 查询字典类型列表
export function listDictType(query) {
  return request({
    url: '/sys/dictType/list',
    method: 'get',
    params: query
  })
}

// 查询字典类型详细
export function getDictType(dictId) {
  return request({
    url: '/sys/dictType/' + dictId,
    method: 'get'
  })
}

// 新增字典类型
export function addDictType(data) {
  return request({
    url: '/sys/dictType',
    method: 'post',
    data: data
  })
}

// 修改字典类型
export function updateDictType(data) {
  return request({
    url: '/sys/dictType',
    method: 'put',
    data: data
  })
}

// 删除字典类型
export function delDictType(dictId) {
  return request({
    url: '/sys/dictType/' + dictId,
    method: 'delete'
  })
}
//更新状态
export function statusChange(data) {
  return request({
    url: '/sys/dictType/updateStatus',
    method: 'post',
    data
  })
}